Skip to content

fix: resolve failing tests and implement missing utilities - #477

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-911-1794641856
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-911-1794641856

Conversation

@stooit

@stooit stooit commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • calculator.divide: throw Division by zero when b === 0
  • string-utils: implement truncate (word-boundary, ... counted in maxLength); wordCount handles repeated whitespace
  • date-utils.formatRelative: use Math.round for days (36h → "2 days ago")
  • task-manager: implement remove, update, sortBy (priority/createdAt/status)
  • validator: isEmail accepts 2+ letter TLDs; isUrl accepts ports

bun test: 60 pass, 0 fail (was 16 failing). tsc --noEmit clean. No test files or dependencies changed.

Assumptions

  • sortBy("status") orders pending → in_progress → completed (no test covers it; it was in the existing type signature).
  • truncate with maxLength < 3 still returns "..." (untested edge case, left as is).
  • update uses Object.assign, so it doesn't guard against callers overwriting id. Review rated this low severity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant